package o;

import android.os.Bundle;
import android.text.TextUtils;
import com.huawei.cloudservice.CloudRequestHandler;
import com.huawei.hwid.core.constants.HwAccountConstants;
import com.huawei.hwid.core.helper.handler.ErrorStatus;

public class cce implements CloudRequestHandler {
    private e ˋ;

    public interface e {
        void ˊ(String str);

        void ˎ();
    }

    public void ˎ(e eVar) {
        this.ˋ = eVar;
    }

    public void onFinish(Bundle bundle) {
        if (bundle != null) {
            Object obj = "";
            if (bundle.getBoolean(HwAccountConstants.SERVICETOKENAUTH_IS_SECCUSS)) {
                obj = bundle.getString("url");
            }
            if (TextUtils.isEmpty(obj)) {
                bqx.ˊ("UpdateHeadPicRequestHandler", "url is empty");
                ˊ();
                return;
            }
            ˏ(obj);
            return;
        }
        bqx.ˊ("UpdateHeadPicRequestHandler", "bundle is null");
        ˊ();
    }

    private void ˏ(String str) {
        if (this.ˋ != null) {
            this.ˋ.ˊ(str);
        }
    }

    private void ˊ() {
        if (this.ˋ != null) {
            this.ˋ.ˎ();
        }
    }

    public void onError(ErrorStatus errorStatus) {
        if (errorStatus != null) {
            bqx.ॱ("UpdateHeadPicRequestHandler", errorStatus.getErrorCode() + "-----" + errorStatus.getErrorReason());
        }
        ˊ();
    }
}
